/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Items;

import Actors.Actor;
import Actors.HumanControlledBall;
import Model.Case;
import Model.Inventory;
import java.awt.image.BufferedImage;

/**
 *
 * @author Snowangelic
 */
public abstract class Item {

    public BufferedImage itemImage;
    public Case myCase;
    protected Inventory inventory;

    //public abstract void ballIsOnMe();
    //public abstract void actorEnters(Actor actor);
    public abstract void update(long dtime);
    public abstract void setImage();


    public Item (){
        setCase(null);
        setImage();
    }

    public void setInventory(Inventory inventory){
        this.inventory=inventory;
    }

    public double[] getImpulse(Actor actor) {
        return null;
    }
    
    public BufferedImage getImage(){
        return itemImage;
    }

    public void setCase(Model.Case myCase){
        this.myCase=myCase;
    }

    protected void changed(){
        myCase.setItemChanged(true);
    }

     public void goToInventory() {
        inventory.addItem(this);
        if(myCase!=null)myCase.removeItem();
        setCase(null);
    }

}
